import React, { Component } from 'react';
import {HashRouter as Router , Route, Switch} from 'react-router-dom';
import About from './../route1/About';
import Info from './Info';
import Main from './Main';
import Topic from './../route1/Topic';
import Home from './Home';
import NoMatch from './NoMatch';
class IRouter extends Component {
    render() {
        return (
            <Router>
                <Home>
                    <Switch>
                        <Route path="/main"  render={() =>
                            <Main>
                                <Route path="/main/:id" component={Info}></Route>
                            </Main>
                        }></Route>
                        <Route path="/about" component={About}></Route>
                        <Route path="/topic" component={Topic}></Route>
                        <Route  component={NoMatch}></Route>
                    </Switch>
                </Home>
            </Router>
        );
    }
}

export default IRouter;